from django.conf.urls import url
from rest_framework.routers import DefaultRouter

from areas import views

urlpatterns = [
    # url(r'^areas/$', views.AreaListView.as_view()),
    # url(r'^areas/(?P<pk>\d+)/$', views.AreaRetrieveView.as_view()),
]

router = DefaultRouter()
# base_name路由名称的前缀
# ^areas/$  name: areas-list
# ^areas/{pk}/$  name: areas-retrieve
router.register(r'areas', views.AreasViewSet, base_name="areas")

urlpatterns += router.urls
